<form id="form" action="{:url('adwords/edit')}">
<input type="hidden" name="id" value="{$info.id}"/>
<input type="hidden" name="picture" value="{$info.picture}" id="picture" />
<input type="hidden" name="group" value="{$info.group?:$group}" />
<table class="formtable"> 
    <tr>
        <th>跳转方式:</th>
        <td>
            <select datatype="*" class="select w300" name="open_type">
                <option value="navigate"{if $info.open_type =='navigate'} selected{/if}>navigate [保留并跳转到新页面]</option>
                <option value="redirect"{if $info.open_type =='redirect'} selected{/if}>redirect [关闭并跳转到新页面]</option>
                <option value="switchTab"{if $info.open_type =='switchTab'} selected{/if}>switchTab [关闭并跳转TabBar页面]</option>
            </select>
        </td>
    </tr>
    <tr><th>广告标题:</th><td><input autocomplete="off" class="input w300" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
    <tr><th>链接地址:</th><td>
    <select id="miniapp_apge" class="select readonly">
        {if $list.errcode == 0}
            {foreach $list.page_list as $vo}
            <option value="{$vo}">{$vo}</option>
            {/foreach}
        {/if}
        </select><span class="gray"> * 替换为正确的参数</span><br />
        <input class="input w400" datatype="*" ignore="ignore" type="text" name="link" value="{$info.link|dehtml}" />
        
    </td></tr>
    <tr><th></th>
        <td>
            <div class="img-review select_img" url="{:url("system/passport.common/upload")}">{if $info.picture}<img src="{$info.picture}">{/if}</div>
        </td>
    </tr>  
    <tr>
        <th></th>
        <td>
            <input type="submit" value="确定" class="button button-blue submit" />
            <input type="reset" value="重置" class="button button-blank"/>
        </td>
    </tr>
</table>
</div>
</form>
<script type="text/javascript">
Do('base','layer','form', function () {
    $('#form').isForm();
    $(".select_img").win(); 
    $("#miniapp_apge").change(function(){
        $("input[name='link']").val($(this).val());
    }); 
})
//添加图片
function setImg(show_src){
    $("#picture").val(show_src);
    $(".img-review").html('<img src="'+show_src+'" style="max-width:400px">');  
}
</script>